﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Infastructure.CrossCutting;
using Microsoft.Practices.Unity;

namespace DistributedServices.Core.InstanceProvider
{
   public static class RootContainer
    {

        #region Properties

        static IUnityContainer _currentContainer;

        /// <summary>
        /// Get the current configured container
        /// </summary>
        /// <returns>Configured container</returns>
        public static IUnityContainer Current
        {
            get
            {
                return _currentContainer;
            }
        }

        #endregion

        #region ctor

        static RootContainer()
        {
            _currentContainer = new UnityContainer();
            _currentContainer.RegisterType<ITraceManager, TraceManager>();

        }

        #endregion
    }
}
